<%@ include file="/common/taglibs.jsp"%>
<probiz:pageHeading pageHeadingKey="menu.newsletterGroupList" />

<content tag="buttons">
	<probiz:iconBtn btnType="add" onclick="return fnDoAdd(this);" />
	<!--<probiz:iconBtn btnType="save" onclick="return fnDoMultiSave(this);" />-->
	<probiz:iconBtn btnType="delete" onclick="return fnDoMultiDelete(this);" />
	
</content>
<search:searchBox formAction="${ctxPath}/customer/newsletterGroup.html">
	<div class="basic_search">
		<search:basicSearch attrPath="s.name" attrNameKey="newsletterGroup.name" datatype="String" operator="LIKE" classes="inputtxt" labelWidth="90px"/>
	</div>
	<div class="more_search">
		<table border="0" cellspacing="0" cellpadding="0" class="search_table">
			<search:input attrPath="s.description" attrNameKey="newsletterGroup.description" datatype="String" operator="LIKE" classes="inputtxt" style="width:150px" labelWidth="90px"/>
		</table>
	</div>
</search:searchBox>

<form class="mainForm" name="newsletterGroupListForm" method="post">
	<!--editURLPath is used in TblDecorator-->
	<c:set var="editURLPath" value="/customer/newsletterGroup.html?doAction=edit&from=list" scope="page" />
	<div class="top clearfix">
		<ul class="tab">
			<li class="curr"><span><fmt:message key="newsletterGroupList.heading"/></span></li>
		</ul>
		<%@include file="/common/pagingOnlyTop.jsp"%>
	</div>
	<div class="data">
		<c:set var="checkAll"><input type="checkbox" name="allbox" onclick="checkAll(this.form)" style="margin: 0 0 0 0px" /></c:set>
		<display:table name="${newsletterGroupList}" cellspacing="0" cellpadding="0" uid="newsletterGroupItem"
			class="list_table" export="false" requestURI="" style="width:100%">
			<display:column class="checkbox_column" title="${checkAll}" media="html">
				<input type="checkbox" name="multiIds" value="${newsletterGroupItem.newsletterGroupId}"	class="checkbox" title="${newsletterGroupItem.name}"/>
			</display:column>
			<display:column sortable="true" url="${editURLPath}" paramId="newsletterGroupId" paramProperty="newsletterGroupId"
				decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="newsletterGroup.name">
				${newsletterGroupItem.name}
			</display:column>
		    <display:column style="width:30%" property="description" sortable="false" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="newsletterGroup.description"/>
		    <display:column style="width:8%" sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="newsletterGroup.status">
        		<c:choose>
        			<c:when test="${newsletterGroupItem.status eq 1}"><span style="color:green"><fmt:message key="status.active"/></span></c:when>
        			<c:otherwise><fmt:message key="status.inactive"/></c:otherwise>
        		</c:choose>
        	</display:column>
        	<display:column style="width:8%" sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="newsletterGroup.isVisibleToFront">
        		<c:choose>
        			<c:when test="${newsletterGroupItem.isVisibleToFront eq 1}"><span style="color:green"><fmt:message key="newsletterGroup.isVisibleToFront.yes"/></span></c:when>
        			<c:otherwise><fmt:message key="newsletterGroup.isVisibleToFront.no"/></c:otherwise>
        		</c:choose>
        	</display:column>
		    <display:column style="width:8%" property="sortOrder" sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="newsletterGroup.sortOrder"/>
		    <display:column style="width:12%" sortable="true" headerClass="data-table-title"
        		decorator="com.probiz.estore.core.decorator.TblColumnDecorator" titleKey="common.message.updateTime">
        		<common:datetimeFormat date="${newsletterGroupItem.updateTime}"/>
        	</display:column>	
        		
		</display:table>
		<%@include file="/common/pagingOnly.jsp"%>
	</div>
</form>
<script type="text/javascript">
$j(document).ready(function () {
	highlightTableRows("newsletterGroupItem");
});
</script>